package com.eflow.model.e;

import lombok.Getter;

/**
 * 用户选择类型
 * @author hui se
 * @description
 * @create 2021-03-25 14:30
 **/
public enum SelectUserTypeEnum {
    /**
     * 系统配置
     */
    SET(1,"系统配置"),
    /**
     * 用户自选
     */
    USER(2,"用户自选"),
    /**
     * 指定
     */
    POINT(3,"指定");
    @Getter
    private int code;
    @Getter
    private String msg;
    SelectUserTypeEnum(int code,String msg){
        this.code = code;
        this.msg = msg;
    }

    /**
     * 通过code获取Msg
     *
     * @param code
     * @return
     * @Description:
     */
    public static SelectUserTypeEnum getEnumByCode(int code) {
        for (SelectUserTypeEnum e : SelectUserTypeEnum.values()) {
            if (e.code == code) {
                return e;
            }
        }
        return null;
    }
}
